﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace OFXParser
{
    public class Extract
    {

        private HeaderExtract headerExtract;
        private BankAccount bankAccount;
        private String status;
        private DateTime initialDate;
        private DateTime finalDate;
        private ArrayList transactions;

        public Extract(HeaderExtract headerExtract, BankAccount bankAccount,
            String status, DateTime initialDate, DateTime finalDate)
        {
            this.headerExtract = headerExtract;
            this.bankAccount = bankAccount;
            this.status = status;
            this.initialDate = initialDate;
            this.finalDate = finalDate;
        }

        public Extract(HeaderExtract headerExtract, BankAccount bankAccount,
            String status)
        {
            this.headerExtract = headerExtract;
            this.bankAccount = bankAccount;
            this.status = status;
        }

        public HeaderExtract HeaderExtract
        {
            get { return headerExtract; }
            set { headerExtract = value; }
        }

        public BankAccount BankAccount
        {
            get { return bankAccount; }
            set { bankAccount = value; }
        }

        public String Status
        {
            get { return status; }
            set { status = value; }
        }

        public DateTime InitialDate
        {
            get { return initialDate; }
            set { initialDate = value; }
        }

        public DateTime FinalDate
        {
            get { return finalDate; }
            set { finalDate = value; }
        }

        public ArrayList Transactions
        {
            get { return transactions; }
        }

        public HeaderExtract Head
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        public BankAccount BankAccount1
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        public void addTransaction(Transaction transaction)
        {
            if (this.transactions == null)
            {
                this.transactions = new ArrayList();
            }
            this.transactions.Add(transaction);
        }


    }
}